home *** CD-ROM | disk | FTP | other *** search
- TCards
-
- This VCL allows the user to easily use the cards supplied with
- Windows in the CARDS.DLL, and build games.
-
- PROPERTIES
-
- CardBack: This is the style of the design used to draw the
- card when CardStyle is set to cdBack. Possible
- values = (cbDiag,cbHatch,cbRobot,cbRoses,
- cbGreenPlant,cbBluePlant,
- cbLightFish,cbDarkFish,cbShell,cbCastle,
- cbBeach,cbHand).
-
- CardStyle: This depicts how the card will be drawn. Possible
- values are:
- cdBack: Draw card back design
- cdFront: Draw card front
- cdO: Draw placeholder card
- cdX: Draw invalid placeholder card
-
- FaceValue: This is the face value of the card (ie 1-13)
-
- Selected: When selected is true, card is drawn inversed, else
- card is drawn normal.
-
- Suit: Depicts what suit the given card is. Possible
- values are:
- suClubs
- suDiamonds
- suHearts
- suSpades
-
- Value: Depicts the value of the card using the formula:
- Value:=FaceValue + (ord(Suit) * 13);
- Conversely:
- FaceValue:=Value - (ord(Suit) * 13);
-
-
-
- Installing TCards
-
- To install this VCL, copy both CARDS.DCU and CARDS.DCR to the
- directory where you have your other shareware controls. Then,
- from Delphi's main menu, select Options|Install Components. In the
- dialog, click on the Add... button, then Browse... and change to the
- drive/directory where you stored the above two files. Select
- CARDS.DCU and click OK, then OK again.
-
- Using TCARDS
-
- To use this control, simply place it on your form, and edit the
- CardBack, CardStyle, Suit, and Value properties.
-
- Sample Procedures:
-
- procedure initdeck;
- var
- i:integer;
- begin
- {Initializes deck array, do once per program, or to reset}
- {deck[1..52] is a global array}
- for i:= 1 to 52 do
- deck[i]:=i;
- end;
-
-
- procedure shuffledeck;
- var
- i,j,k,temp:integer;
- begin
- {deck[1..52] is a global array}
- Randomize;
- For i := 1 To 10 do
- For j := 1 To 52 do
- begin
- k := trunc(1 + (52 * Random));
- temp := deck[j];
- deck[j] := deck[k];
- deck[k] := temp;
- end;
- end;
-
- Support:
-
- Send comments and questions to:
-
- Zane Rathwick
- Indigo Software
-
- CIS: 74633,1314
- AOL: ZaneR
- Internet: ZaneR@aol.com
- U.S. Mail: Zane Rathwick
- Indigo Software
- 4240 Park Newport Suite 308
- Newport Beach, CA 92660
-
- Registering TCards
-
- To register TCards and receive source code, send $10 (+$2 S&H) to:
-
- Indigo Software
- 4240 Park Newport # 308
- Newport Beach, CA 92660
-
- You can save the $2 shipping fee by specifying a Compuserve or AOL
- account to have your control sent to instead of by mail.